From 5c1f0e17b8b0e9ebba6078854c1224e7f5d93ac2 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Sun, 30 Nov 2025 11:50:29 +0200 Subject: pf changes --- templates/etc_jail.conf.d_[jailname].conf.j2 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'templates/etc_jail.conf.d_[jailname].conf.j2') diff --git a/templates/etc_jail.conf.d_[jailname].conf.j2 b/templates/etc_jail.conf.d_[jailname].conf.j2 index a12226d..3e11e4f 100644 --- a/templates/etc_jail.conf.d_[jailname].conf.j2 +++ b/templates/etc_jail.conf.d_[jailname].conf.j2 @@ -22,12 +22,14 @@ exec.poststart += "jexec ${name} ifconfig epl{{ jail.num }}b up"; exec.poststart += "ifconfig epl{{ jail.num }}a up"; exec.poststart += "jexec ${name} ifconfig epl{{ jail.num }}b 192.168.2.{{ jail.num }}/16"; + exec.poststart += "jexec ${name} route delete default || echo 'No default route to delete'"; + {% if jail.name != "ingress" %} {% for ing in jails -%} {% if ing.name == "ingress" -%} exec.poststart += "jexec ${name} route add default 192.168.2.{{ ing.num }} || echo 'Failed to add default route'"; {% endif %} {% endfor %} - {% if jail.name == "ingress" -%} + {% else %} exec.poststart += "ifconfig epw{{ jail.num }}b vnet ${name}"; exec.poststart += "jexec ${name} ifconfig epw{{ jail.num }}b up"; exec.poststart += "ifconfig epw{{ jail.num }}a up"; -- cgit v1.3